const examinationRouter = require('express').Router()
const examapi = require('../api/examination')

examinationRouter.use('/echo',(req,res)=>{
    res.send({
        msg:"/examination/ echo"
    })
})
examinationRouter.post('/addexam',(req,res)=>{
    examapi.addExam(req,res);
})
examinationRouter.get('/examlist',(req,res)=>{
    examapi.examList(req,res);
})
examinationRouter.get('/examdetail',(req,res)=>{
    examapi.examDetail(req,res);
})
examinationRouter.post('/updateexam',(req,res)=>{
    examapi.updateExam(req,res)
})
examinationRouter.post('/deleteexam',(req,res)=>{
    examapi.deleteExam(req,res)
})
examinationRouter.get('/myexamlist',(req,res)=>{
    examapi.myExamList(req,res)
})
examinationRouter.post('/takeexam',(req,res)=>{
    examapi.takeExam(req,res)
})
examinationRouter.get('/exampaper',(req,res)=>{
    examapi.examPaper(req,res)
})

examinationRouter.post('/saveanswerpaper',(req,res)=>{
    examapi.saveAnswerPaper(req,res)
})
examinationRouter.post('/handinpaper',(req,res)=>{
    examapi.handInPaper(req,res)
})
examinationRouter.get('/myanswerpaper',(req,res)=>{
    examapi.myAnswerPaper(req,res)
})


module.exports = {
    examinationRouter
}